<script type="text/javascript"> 
 
    $(document).ready(function(){ 
		// initialise Superfish 
        $("ul.sf-menu").superfish({ 
            pathClass:  'Dictionaries' 
        }); 
    }); 
 
</script>
<h2><?php echo $pageTitle; ?></h2>

<?php echo $form->create('Dictionary');?>
	<table border="0" cellpadding="0" cellspacing="0">
		
		<tr>
			<td width="550" align="left" valign="top" class="text">
				<div>
					<br />
					<?php echo $form->input('Dictionary.key', array('label'=>'Key:<br />', 'style'=>'width:250px', 'type'=>'text'));?>
					<br />
					<?php echo $form->input('Dictionary.eng', array('label'=>'English:<br />', 'style'=>'width:250px'));?>
					<br />
					<?php echo $form->input('Dictionary.rus', array('label'=>'Russian:<br />', 'style'=>'width:250px'));?>
					<br />
					<?php echo $form->input('Dictionary.arm', array('label'=>'Armenian:<br />', 'style'=>'width:250px'));?>
					<br />
					<?php echo $form->input('Dictionary.group', array(
											'label'=>'Type a Group where this word should be<br />',
											'onchange'=>'MM_jumpDictionary(this); ',
											'options' => $contentsUrls
					));?>
					<br />
					<?php echo $form->input('Dictionary.group_other', array(
						'style'=>'display:none;',
						'label'=>'<br>'
					));?>
					<br /><br />
			  	</div>
			  	
				<input type="submit" name="Save" value="Save" />	
			</td>
		</tr>
	</table>
<?php echo $form->end();?>

<script type="text/JavaScript">

function MM_jumpDictionary(selObj){ //v3.0
//console.log(selObj.options[selObj.selectedIndex].value);
  if(selObj.options[selObj.selectedIndex].value=="-2") {
  	document.getElementById("DictionaryGroupOther").style.display="block";
  }
  else {
	  if(selObj.options[selObj.selectedIndex].value=="-1"){
  		document.getElementById("DictionaryGroupOther").style.display="none";
		alert("Select the url, or choose other to type your oun URL");
	  }
	  else{
  		document.getElementById("DictionaryGroupOther").style.display="none";
	  }
  }
  //eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  //if (restore) selObj.selectedIndex=0;
}

</script>